<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    let vm = {
        data () {
            return {
                ipt: '',
            }
        },
        template: `
                    <div>
                        <input @input="handler" :value="ipt"/>
                        {{ipt}}
                        <button @click="">点击</button>
                    </div>
                `,
        methods: {
            handler (e) {
                console.log(e.target.value);
                this.ipt = e.target.value
            }
        }
    }
    Vue.createApp(vm).mount('#app')
</script>

</html>